package com.whut.common;

import java.io.Serializable;
import java.util.List;

public class BasePage<T> extends PageBase implements Serializable {

    private static final long serialVersionUID = -2289794528675355658L;

    /**
     * 分页主列表
     */
    protected List<T> list;

    /**
     * 总计条数
     */
    protected Integer total;

    public BasePage() {
    }

    public BasePage(List<T> list) {
        this.list = list;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public void setPage(BasePage page) {
        this.setPageNum(page.getPageNum());
        this.setPageSize(page.getPageSize());
        this.setTotal(page.getTotal());
    }

    public void setPage(Integer pageNum, Integer pageSize, Integer total) {
        this.setPageNum(pageNum);
        this.setPageSize(pageSize);
        this.setTotal(total);
    }
}
